﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'up_VendorDistributionPole_QuickSearch')
	DROP PROCEDURE up_VendorDistributionPole_QuickSearch
GO

CREATE PROCEDURE [dbo].[up_VendorDistributionPole_QuickSearch]
	 @UtilityFk int = 0
	,@Vendor_Distribution_Poles_PoleId int = 0
AS

SET NOCOUNT ON	

SELECT 
	CAST(poles.Vendor_Distribution_Poles_PoleId as varchar)
FROM 
	v_tb_Vendor_Distribution_Poles poles
INNER JOIN tb_vendor_projects projects
	ON projects.Vendor_ProjectId = poles.ProjectFk
	AND projects.UtilityFk = @UtilityFk
WHERE 
	Vendor_Distribution_Poles_PoleId = @Vendor_Distribution_Poles_PoleId

 